<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------



use think\Route;

route::miss('admin/Index/notfound');

route::get('admin/login','admin/Index/login'); //登录页
route::get('admin/logout','admin/Index/logout'); // 注销
route::get('/','admin/Index/home');
route::post('admin/dologin','admin/Index/dologin');

route::resource('adminuser','admin/Adminuser');
route::post('admin/adminuser/createsave','admin/Adminuser/createsave');
route::post('admin/adminuser/changestatus','admin/Adminuser/changestatus');  // 改变状态


route::resource('admin/user','admin/User');
route::post('admin/user/createsave','admin/User/createsave');
route::get('admin/user/shiming','admin/User/shiming');
route::post('admin/user/changeshiming','admin/User/changeshiming');  // 改变实名状态
route::post('admin/user/changestatus','admin/User/changestatus');  // 改变状态

route::resource('admin','admin/Index');

route::resource('role','admin/Role');
route::post('admin/role/createsave','admin/Role/createsave');
route::post('admin/role/changestatus','admin/Role/changestatus');  // 改变状态
route::post('admin/role/doedit','admin/Role/doedit');

route::resource('node','admin/Node');
route::post('admin/node/createsave','admin/Node/createsave');
route::post('admin/node/changestatus','admin/Node/changestatus');  // 改变状态
route::post('admin/node/doedit','admin/Node/doedit');



route::resource('goods','goods/Goods');
route::post('goods/goods/createsave','goods/Goods/createsave');
route::post('goods/goods/doedit','goods/Goods/doedit');
route::post('goods/goods/changestatus','goods/Goods/changestatus');  // 改变状态
route::post('goods/goods/changehot','goods/Goods/changehot');  // 改变hot

route::resource('ask','goods/Ask');
route::post('goods/ask/createsave','goods/Ask/createsave');
route::get('ask/status/:status','goods/Ask/index');
route::get('goods/ask/index/status/:status','goods/Ask/index');
route::post('goods/ask/update','goods/Ask/update');

route::get('order/[:day]','goods/order/index'); //order
route::get('ordercount','goods/API/orderCount');


route::get('admin/msglist','admin/Message/index');
route::get('admin/msg','admin/Message/msg');
route::post('admin/msg/send','admin/Message/sendMsg');

// API
route::get('api/goods/hot','goods/API/hotgoods');

// 公共 用户登录注册



Route::get('login','user/Login/index');
Route::post('user/Login/login','user/Login/login');
Route::get('user/Login/register','user/Login/register');
Route::post('user/Login/telreg','user/Login/telreg');
Route::get('user/Login/exitlogin','user/Login/exitlogin');


Route::get('user/Index/index','user/Index/index');
Route::get('user/Xunjia/index/[:id]','user/Xunjia/index');
Route::get('user/Xunjia/myxunjia','user/Xunjia/myxunjia');
Route::get('user/Xunjia/get/[:stockcode]','user/Xunjia/get');
Route::post('user/Xunjia/addask','user/Xunjia/addask');

Route::delete('user/Xunjia/delask/:id','user/Xunjia/delask');

Route::get('user/Chicang/index','user/Chicang/index');
Route::get('user/Chicang/jiaogedan','user/Chicang/jiaogedan');
Route::get('user/UserCenter/index','user/UserCenter/index');
Route::get('user/UserCenter/edittel','user/UserCenter/edittel');
Route::put('user/SendSMS1/:tel','user/SendSMS/SendSMS1');
Route::put('user/SendSMS2/:tel','user/SendSMS/SendSMS2');
Route::put('user/SendSMS3/:tel','user/SendSMS/SendSMS3');

Route::post('user/UserCenter/doedittel','user/UserCenter/doedittel');
Route::get('user/UserCenter/shiming','user/UserCenter/shiming');
Route::post('user/UserCenter/doshiming','user/UserCenter/doshiming');
Route::get('user/UserCenter/editloginpwd','user/UserCenter/editloginpwd');
Route::post('user/UserCenter/doeditloginpwd','user/UserCenter/doeditloginpwd');
Route::get('user/UserCenter/editzfpwd','user/UserCenter/editzfpwd');
Route::post('user/UserCenter/doeditzfpwd','user/UserCenter/doeditzfpwd');
Route::post('buy','user/Goods/buy');
Route::post('sell','user/Goods/sell');
Route::get('msg','user/Mycontroller/msg');
Route::get('mymsg','user/UserCenter/mymsg');
Route::get('relogin','user/Login/reloginpwd');
Route::post('dorelogin','user/Login/doreloginpwd');
Route::post('dorelogin1','user/Login/doreloginpwd1');
Route::get('guize','user/Login/guize');
Route::get('tiaokuan','user/Login/tiaokuan');
Route::get('rj','user/UserCenter/rj');
Route::post('dorj','user/UserCenter/dorj');
Route::get('cj','user/UserCenter/cj');
Route::post('docj','user/UserCenter/docj');




return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
